package com.learn.yu.life;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : Yu.Tan
 * @date : 2023/6/16 17:13
 * @desc : **
 */
@Configuration
public class BeansConfig {
    @Bean(name = "userLifeYu", initMethod = "doInit", destroyMethod = "doDestroy")
    public UserLife create() {
        UserLife userLife = new UserLife();
        userLife.setName("yu.tan");
        userLife.setAge(18);
        return userLife;
    }
}
